<template>
  <div>
    <h1>欢迎 XXX</h1>
    <button @click="logout">注销登录</button>
  </div>
</template>

<script>
  import {delCookie} from '@/assets/js/cookie.js'
  export default {
    name: "home",
    methods: {
      logout: function () {
        delCookie('username');
        this.$router.push('login')
      }
    }
  }
</script>

<style scoped>
  .sline {
    display: block;
    margin: 10px auto;
    width: 200px;
    height: 30px;
  }

  .bg_clear{
    border: none;
    background: none;
  }
</style>
